package drds.binlog.common.position;


import drds.binlog.common.Authors;
import drds.common.$;
import drds.common.Author;
import lombok.Getter;
import lombok.Setter;

@Author(name = Authors.LI_YANG)
public class ClientInfo
{
    @Setter
    @Getter
    private short clientId;
    @Setter
    @Getter
    private String destination;

    @Setter
    @Getter
    private String filter;

    public ClientInfo()
    {
    }

    public ClientInfo(String destination, short clientId, String filter)
    {
        this.destination = destination;
        this.clientId = clientId;
        this.filter = filter;
    }

    public ClientInfo(String destination, short clientId)
    {
        this.clientId = clientId;
        this.destination = destination;
    }

    public Boolean hasFilter()
    {
        return $.isNotNullAndNotEmpty(filter);
    }


}
